package com.example.springboot_lei02.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class AdminWebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new com.example.springboot_lei02.Fitter.LoginFitter())
                .addPathPatterns("/**","")//所以请求都会被拦截
                .excludePathPatterns("/","/login","/findById","/css/**","/fonts/**","/images/**","/js/**");
    }
}
